package day20.tarena.io;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class TestLine {

	/**
	 * @param args
	 *            要求：逐行BufferedReader
	 * 			   IO : 里面的大部分都要抛异常
	 * 
	 * 
	 */
	public static void main(String[] args) throws Exception{
		FileInputStream fis = new 
			FileInputStream("../../user.xml");
		/**
		 * InputStreamReader 桥梁流
		 */
		InputStreamReader isr = new		
			InputStreamReader(fis);
		/**
		 * BufferedReader逐行读取流
		 */
		BufferedReader br =new 
			BufferedReader(isr);
		/**
		 * 
		 */
		for(int i=1;;i++){
			String temp = br.readLine();
			if(temp == null){
				break;
			}
			System.out.println(i+"-----"+temp);
		}
		br.close();
	}
}
